package com.guochenglang.www.dao.impl;

import com.guochenglang.www.dao.InviteMessageDao;
import com.guochenglang.www.pojo.InviteMessage;
import com.guochenglang.www.util.GetTable;
import com.guochenglang.www.util.connect.JdbcUtil;

import java.sql.SQLException;
import java.util.ArrayList;

/**
 * 邀请消息提醒的的Dao层
 *
 * @author GuoChenglang
 */
public class InviteMessageDaoImpl implements InviteMessageDao {
    /**
     * 表名
     */
    private static final String TABLE = GetTable.getTable(InviteMessage.class);

    @Override
    public ArrayList<InviteMessage> inviteMessageSelect(InviteMessage conditions) throws SQLException, InterruptedException, IllegalAccessException, InstantiationException {
        return JdbcUtil.selectMax(TABLE, conditions);
    }

    @Override
    public int insertInviteMessage(InviteMessage comfort) throws SQLException, InterruptedException, IllegalAccessException {
        return JdbcUtil.insert(TABLE, comfort);
    }

    @Override
    public int deleteInviteMessage(InviteMessage conditions) throws SQLException, InterruptedException, IllegalAccessException {
        return JdbcUtil.delete(TABLE, conditions);
    }
}
